//
// CAsyncFileManager3D.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CVector;

public class CAsyncFileManager3D {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CAsyncFileManager3D(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CAsyncFileManager3D obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CAsyncFileManager3D(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public static void terminate() {
    nel3dJNI.CAsyncFileManager3D_terminate();
  }

  public void loadMesh(String sMeshName, SWIGTYPE_p_p_NL3D__IShape ppShp, IDriver pDriver, CVector position, long textureSlot) {
    nel3dJNI.CAsyncFileManager3D_loadMesh(swigCPtr, this, sMeshName, SWIGTYPE_p_p_NL3D__IShape.getCPtr(ppShp), IDriver.getCPtr(pDriver), pDriver, CVector.getCPtr(position), position, textureSlot);
  }

  public boolean cancelLoadMesh(String sMeshName) {
    return nel3dJNI.CAsyncFileManager3D_cancelLoadMesh(swigCPtr, this, sMeshName);
  }

  public void loadIG(String igName, SWIGTYPE_p_p_NL3D__CInstanceGroup ppIG) {
    nel3dJNI.CAsyncFileManager3D_loadIG(swigCPtr, this, igName, SWIGTYPE_p_p_NL3D__CInstanceGroup.getCPtr(ppIG));
  }

  public void loadIGUser(String igName, SWIGTYPE_p_p_NL3D__UInstanceGroup ppIG) {
    nel3dJNI.CAsyncFileManager3D_loadIGUser(swigCPtr, this, igName, SWIGTYPE_p_p_NL3D__UInstanceGroup.getCPtr(ppIG));
  }

  public void loadTexture(CTextureFile textureFile, SWIGTYPE_p_bool pSgn, CVector position) {
    nel3dJNI.CAsyncFileManager3D_loadTexture(swigCPtr, this, CTextureFile.getCPtr(textureFile), textureFile, SWIGTYPE_p_bool.getCPtr(pSgn), CVector.getCPtr(position), position);
  }

  public boolean cancelLoadTexture(CTextureFile textFile) {
    return nel3dJNI.CAsyncFileManager3D_cancelLoadTexture(swigCPtr, this, CTextureFile.getCPtr(textFile), textFile);
  }

  public void loadFile(String fileName, SWIGTYPE_p_p_unsigned_char pPtr) {
    nel3dJNI.CAsyncFileManager3D_loadFile(swigCPtr, this, fileName, SWIGTYPE_p_p_unsigned_char.getCPtr(pPtr));
  }

  public void loadFiles(Vector_String vFileNames, SWIGTYPE_p_std__vectorT_unsigned_char_pp_t vPtrs) {
    nel3dJNI.CAsyncFileManager3D_loadFiles(swigCPtr, this, Vector_String.getCPtr(vFileNames), vFileNames, SWIGTYPE_p_std__vectorT_unsigned_char_pp_t.getCPtr(vPtrs));
  }

  public void signal(SWIGTYPE_p_bool pSgn) {
    nel3dJNI.CAsyncFileManager3D_signal(swigCPtr, this, SWIGTYPE_p_bool.getCPtr(pSgn));
  }

  public void cancelSignal(SWIGTYPE_p_bool pSgn) {
    nel3dJNI.CAsyncFileManager3D_cancelSignal(swigCPtr, this, SWIGTYPE_p_bool.getCPtr(pSgn));
  }

}
